home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1997 November & December / Amiga-CD 1997 #11-12.iso / online / inetutils-1.4 / docs / smtppost.man < prev   
Text File  |  1994-12-09  |  9KB  |  290 lines

  1. SMTPpost                                SMTPpost
  2.  
  3.  
  4. NAME
  5.  
  6.     SMTPpost - post a mail message using SMTP
  7.  
  8.  
  9. SYNOPSIS
  10.  
  11.     SMTPpost [-f fromuser] [-R userrealname] [-s subject] [-r]
  12.          [-Q] [-S]
  13.          [-raw] [-n] [-t to-addr] [-c cc-addr] [-b bcc-addr]
  14.          [mailfile | addresses] <mailfile
  15.  
  16.  
  17. DESCRIPTION
  18.  
  19.     SMTPpost uses SMTP (per RFC-821) to post 'mailfile' to the
  20.     addresses specified via the -t, -c and -b arguments. If none
  21.     of -t, -c or -b are specified, the destination addresses are
  22.     obtained from the headers in 'mailfile'.
  23.  
  24.     Whenever an address is required, a comma-separated set of
  25.     addresses may be applied. If they are for the -t, -c or -b
  26.     arguments, there may be *no* white-space in between the
  27.     addresses.
  28.  
  29.     SMTPpost will attempt to open a TCP SMTP socket to each
  30.     destination host. If that fails, SMTPpost will attempt to
  31.     forward the mail to the SMTPSmarterHost (which is specified
  32.     via a required configuration variable). If a socket cannot
  33.     be opened, then SMTPpost will store the article in the
  34.     SMTPSpoolDir (which is also specified via another required
  35.     configuration variable) for processing later by SMTPd.
  36.  
  37.     The -Q argument tells SMTPpost to *not* try to send the
  38.     message immediately. Instead, the article is queued into
  39.     SMTPSpoolDir and SMTPd is expected to process the actual
  40.     transmission of the message.
  41.  
  42.     The -S argument tells SMTPpost to *not* try to access the
  43.     destination host at all. All messages will go directly to
  44.     SMTPSmarterHost (or be queued if it isn't available or if
  45.     the -Q argument is specified).
  46.  
  47.     For the cases where the destination address is the local
  48.     host, SMTPpost also requires the SMTPMailDir configuration
  49.     variable to be assigned, denoting the appropriate directory.
  50.  
  51.     If the delivery succeeds, SMTPpost will log that in the
  52.     INetUtils logfile (INet:Logfile) and return a program value
  53.     of zero.
  54.  
  55.     If the delivery fails, SMTPpost will log that as well, along
  56.     with a description failure reason. SMTPpost will return a
  57.     program value of thirty (30) in that case.
  58.  
  59.     "mailfile" may be specified on the command line, or as the
  60.     standard input.
  61.  
  62.     If SMTPpost's program name starts with an 'r' (such as 'rsmtp')
  63.     then SMTPpost assumes that all command line arguments are
  64.     addresses that the mailfile (which *must* be on standard input)
  65.     are to be delivered to. "mailfile" must be fully formed and
  66.     complete. SMTPpost will not add a "Subject:", "From:" or an
  67.     "Organization:" header in this case. This is called "receive
  68.     mail" mode.
  69.  
  70.     Options:
  71.  
  72.         -b addrs    : Specify an address to which a message is
  73.               be sent (the Blind Carbon Copy header).
  74.               The -b argument may be repeated any
  75.               number of times. No BCC recipient is
  76.               aware of any other BCC recipient.
  77.  
  78.         -c addrs    : Specify an address which is to be added
  79.               to the Carbon-Copy list (the CC: headers).
  80.               The -c argument may be repeated any number
  81.               of times.
  82.  
  83.         -f username : The username to be used in building a From
  84.               header in the article. Note that if a From
  85.               header already exists in the article, then
  86.               SMTPpost will not create another one.
  87.  
  88.         -n        : Do not queue. If the delivery to either the
  89.               destination host and to SMTPSmarterHost
  90.               fails, SMTPpost will normally queue the
  91.               article in SMTPSpoolDir. Setting this
  92.               option prevents that from happening (this
  93.               is intended primarily for SMTPd).
  94.  
  95.         -Q        : Queue the message, do not send immediately.
  96.  
  97.         -S        : Do not attempt a connection to the destination
  98.               host, route the message to SMTPSmarterHost.
  99.  
  100.         -r        : Receive mail mode. All arguments after -r
  101.               are treated as addresses that mailfile (which
  102.               *must* be in standard input) is to be
  103.               delivered to. See discussion above.
  104.  
  105.         -raw    : Normally, if all of -f, -R and -s are not
  106.               specified, SMTPpost will scan "mailfile"
  107.               to obtain the missing headers. This option
  108.               prevents that from occurring. Empty headers
  109.               are created instead.
  110.  
  111.         -R realname : The real name of the user to be used in
  112.               building a From header for the message.
  113.  
  114.         -s text    : The subject of the message. "text" may
  115.               be quoted (and in fact, must be if there
  116.               is any whitespace in it).
  117.  
  118.         -t addrs    : Specify a destination address for the message.
  119.               This one is for the To: header. The -t
  120.               argument may be repeated any number of times.
  121.  
  122. DIAGNOSTICS
  123.  
  124.     Upon success, SMTPpost has a return status of zero.
  125.  
  126.     If the destination host was not available, and SMTPpost queued
  127.     the message (or left it queued, when called from SMTPd); then
  128.     SMTPpost has a return status of 5.
  129.  
  130.     Upon failure of any kind, SMTPpost prints a message to standard
  131.     output, and has an exit status of 30. SMTPpost also prints the
  132.     error message in INet:Logfile.
  133.  
  134.  
  135. CONFIGURATION
  136.  
  137.     CheckUser   string
  138.  
  139.         The CheckUser variable defines a program which is executed for
  140.         incoming mail to validate whether the destination user actually
  141.         exists. To wit:
  142.  
  143.             CheckUser userid
  144.  
  145.         SMTPpost checks the first character of standard output from the
  146.         program (stdout). If it is a '*', then the user is deemed invalid.
  147.         Any other output (or no output) results in the userid being
  148.         accepted as valid.
  149.  
  150.         NOTE: this feature is not available in the freeware version of
  151.           SMTPpost.
  152.  
  153.     HostAliases string
  154.  
  155.         The HostAliases variable contains other hostnames which are the
  156.         local host. For example, if your host is "x.y.z", but you also
  157.         need to accept mail to "zz.zz" as local to you, you should set
  158.         that in HostAliases.
  159.  
  160.         In general, put "localhost,[ip.address],ip.address" plus any
  161.         others into HostAliases.
  162.  
  163.         The comparison is *not* case sensitive.
  164.  
  165.         NOTE: The freeware version of SMTPpost only allows two aliases.
  166.  
  167.     UserName    string
  168.  
  169.         The login id of the current user. Either this or "-f" must be
  170.         specified.
  171.  
  172.     RealName    string
  173.  
  174.         The real name of the current user. Either this or "-R" must be
  175.         specified.
  176.  
  177.     NodeName    string
  178.  
  179.         The name of the current node (computer); normally without a domain.
  180.  
  181.     DomainName  string
  182.  
  183.         The name of the current domain.
  184.  
  185.     HostName    string
  186.  
  187.         The fully qualified domain name of the current computer.
  188.  
  189.         Either this, or NodeName *and* DomainName must be specified.
  190.  
  191.     SMTPAlwaysQueue no/yes
  192.  
  193.         When set to "yes", then SMTPpost will act as if -Q was passed.
  194.         The default is "no".
  195.  
  196.     SMTPMailDir string
  197.  
  198.         The directory where local mail is stored. For AmiTCP, this will
  199.         defaults to "AmiTCP:Mail/", for AS225, this will default to
  200.         "INet:Mail/".
  201.  
  202.     SMTPRoute   string
  203.  
  204.         SMTPRoute may have any of four values, comma or space separated.
  205.         The values are:
  206.  
  207.             MX
  208.             SMTP
  209.             SmarterHost
  210.             UUCP
  211.  
  212.         These values control the way SMTPpost attempts to deliver mail to
  213.         remote hosts.
  214.  
  215.         MX indicates to use the MX record (from DNS) to deliver the mail
  216.         to the destination host via the forwarding host specified in the
  217.         MX record.
  218.  
  219.         SMTP indicates to attempt to deliver the mail directly to the
  220.         remote host.
  221.  
  222.         SmarterHost indicates to deliver the mail to the host specified
  223.         as the SMTPSmarterHost configuration variable.
  224.  
  225.         UUCP indicates to deliver the mail using the mail program specified
  226.         as the UUCPSendMail configuration variable.
  227.  
  228.         The default value is "MX,SMTP,SmarterHost,UUCP". UUCP transfers are
  229.         not attempted if UUCPSendMail is not defined.
  230.  
  231.         NOTE: the freeware version of SMTPpost will only utilize the first
  232.           MX record for any destination host.
  233.  
  234.     SMTPSmarterHost     string
  235.  
  236.         A computer that is assumed to be smarter about delivering SMTP mail
  237.         than we are. This assignment is required.
  238.  
  239.     SMTPSpoolDir    string
  240.  
  241.         The directory where outgoing mail is stored; which could not be
  242.         immediately processed.
  243.  
  244.         For AmiTCP, this defaults to "AmiTCP:MailSpool/", for AS225 this will
  245.         default to "INet:MailSpool/".
  246.  
  247.     UUCPSendMail    string
  248.  
  249.         If the SMTPRoute variable includes UUCP as a part of it, then this
  250.         variable must be defined. It defines the program name of the UUCP
  251.         mail program (typically UUCP:C/RMail).
  252.  
  253.         This must be an RMail type program which takes an address to deliver
  254.         as the command line. For example:
  255.  
  256.             setenv UUCPSendMail uucp:c/sendmail -r -b
  257.  
  258.         or
  259.  
  260.             setenv UUCPSendMail inet:c/smtppost -r
  261.  
  262. NOTES
  263.  
  264.     Performance is improved if you make SMTPpost and RSMTP resident.
  265.  
  266.     SMTPpost duplicates the arguments used by the AmigaUUCP sendmail.
  267.     It can be dropped-in as a replacement for that. The only exception
  268.     is that SMTPpost requires addresses following a "-r", whereas the
  269.     AmigaUUCP sendmail does not.
  270.  
  271.     SMTPpost has been tested with AmigaUUCP, wUUCP, GRn, and BBX and a
  272.     variety of Unix sendmail/smail programs.
  273.  
  274.     SMTPpost will attempt to run a command named by the MAILREADYCMD
  275.     environment variable when delivering local mail. The format of the
  276.     command is:
  277.  
  278.         MAILREADYCMD -x T:MailRdy
  279.  
  280.     SMTPpost will also send a signal to a public message port named
  281.     "T:MailRdy" if it is on the system public list.
  282.  
  283.     For DNS resolution, SMTPpost gets the nameservers and domains to search
  284.     from the inet:db/resolv.conf file (for AS225r2 and its derivatives) and
  285.     from amitcp:db/netdb-myhost (for AmiTCP 2.2 and above).
  286.  
  287. BUGS/TODO
  288.  
  289.     SMTPpost doesn't accept full RFC-822 addresses.
  290.